<?php



class ElinkMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.ElinkMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('elink');
		$tMap->setPhpName('Elink');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('ELINK', 'Elink', 'string', CreoleTypes::VARCHAR, true, 512);

		$tMap->addForeignKey('RELEASE_ID', 'ReleaseId', 'int', CreoleTypes::INTEGER, 'release', 'ID', true, null);

		$tMap->addColumn('HITS', 'Hits', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('ALIAS', 'Alias', 'string', CreoleTypes::VARCHAR, false, 75);

		$tMap->addForeignKey('CATEGORIA_ELINK_ID', 'CategoriaElinkId', 'int', CreoleTypes::TINYINT, 'categoria_elink', 'ID', true, null);

	} 
} 